import React from 'react';
import { Router, Stack, Scene } from 'react-native-router-flux';
import { Provider } from 'react-redux';
import store from '../redux';
import Login from '../pages/login';
import Home from '../pages/Home';
import PhoneBook from '../pages/PhoneBook';
import SportsRankings from '../pages/Work/sportsRankings';
import eduTalk from '../pages/Work/eduTalk/index';
import talkDetail from '../pages/Work/eduTalk/talkDetail';
import talkTotal from '../pages/Work/eduTalk/talkTotal';
import talkHistory from '../pages/Work/eduTalk/talkHistory';
import talkHandle from '../pages/Work/eduTalk/talkHandle';
import ScanQRCode from '../pages/Work/eduTalk/components/ScanQRCode';
import informIdx from '../pages/Work/informModule/index';
import infoAction from '../pages/Work/informModule/infoAction';
import userManual from '../pages/Work/userManual/index';
import repaire from '../pages/Work/repaire/index';
import addRepaire from '../pages/Work/repaire/addRepaire';
import repaireDetails from '../pages/Work/repaire/repaireDetails';
import Detail from '../pages/Message/Detail';
import Work from '../pages/Work';
import WorkDiary from '../pages/Work/workDiary';
import CriminalReleased from '../pages/Work/criminalReleased';
import LettersRegister from '../pages/Work/lettersRegister';
import PersonClock from '../pages/Work/personClock';
import PerforAppraisal from '../pages/Work/perforAppraisal';
import InsertLetter from '../pages/Work/insertLetter';

const Root = () => {
  return (
    <Provider store={store}>
      <Router>
        <Stack key="root">
          <Scene key="app" component={Login} title="Login" hideNavBar={true} />
          <Scene key="home" component={Home} title="Home" hideNavBar={true} />
          <Scene key="phonebook" component={PhoneBook} hideNavBar={true} />
          <Scene
            key="sportsrankings"
            component={SportsRankings}
            hideNavBar={true}
          />
          <Scene key="workdiary" component={WorkDiary} hideNavBar={true} />
          <Scene key="detail" component={Detail} hideNavBar={true} />
          <Scene key="work" component={Work} hideNavBar={true} />
          <Scene key="eduTalk" component={eduTalk} hideNavBar={true} />
          <Scene key="talkDetail" component={talkDetail} hideNavBar={true} />
          <Scene key="talkTotal" component={talkTotal} hideNavBar={true} />
          <Scene key="talkHistory" component={talkHistory} hideNavBar={true} />
          <Scene key="talkHandle" component={talkHandle} hideNavBar={true} />
          <Scene key="informIdx" component={informIdx} hideNavBar={true} />
          <Scene key="infoAction" component={infoAction} hideNavBar={true} />
          <Scene key="repaire" component={repaire} hideNavBar={true} />
          <Scene key="addRepaire" component={addRepaire} hideNavBar={true} />
          <Scene
            key="repaireDetails"
            component={repaireDetails}
            hideNavBar={true}
          />
          <Scene key="userManual" component={userManual} hideNavBar={true} />
          <Scene key="ScanQRCode" component={ScanQRCode} hideNavBar={true} />
          <Scene
            key="criminalReleased"
            component={CriminalReleased}
            hideNavBar={true}
          />
          <Scene
            key="perforAppraisal"
            component={PerforAppraisal}
            hideNavBar={true}
          />
          <Scene
            key="insertLetter"
            component={InsertLetter}
            hideNavBar={true}
          />
          <Scene
            key="lettersRegister"
            component={LettersRegister}
            hideNavBar={true}
          />
          <Scene key="personClock" component={PersonClock} hideNavBar={true} />
        </Stack>
      </Router>
    </Provider>
  );
};

export default Root;
